package com.zut.utils;

import java.util.List;

import com.zut.entity.House;

public class LimitUtil {
	private Integer pageSize=3;//页面条数
	private Integer totalCount; //总条数
	private Integer pageCount;//总页数
	private Integer currentPage; //当前页
	private List<?> data;
	public LimitUtil() {
		super();
	}
	public LimitUtil(Integer pageSize, Integer totalCount, Integer pageCount, Integer currentPage, List<?> data) {
		super();
		this.pageSize = pageSize;
		this.totalCount = totalCount;
		this.pageCount = pageCount;
		this.currentPage = currentPage;
		this.data = data;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public Integer getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}
	public Integer getPageCount() {
		pageCount = (totalCount%pageSize==0)?(totalCount/pageSize):(totalCount/pageSize)+1;
		return pageCount;
	}
	public void setPageCount(Integer pageCount) {
		this.pageCount = pageCount;
	}
	public Integer getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}
	public List<?> getData() {
		return data;
	}
	public void setData(List<?> data) {
		this.data = data;
	}
	@Override
	public String toString() {
		return "LimitUtil [pageSize=" + pageSize + ", totalCount=" + totalCount + ", pageCount=" + pageCount
				+ ", currentPage=" + currentPage + ", data=" + data + "]";
	}
	
	

}
